#include <stdio.h>

namespace sg
{

	class Player 
	{
		public :
			Player(){}
			//virtual ~Player(){}
			~Player(){}
		public :
			virtual void play(){printf("No Play\n");}
			//virtual void play()=0;
	};
	
	class BasketballPlayer : public Player 
	{
		public :
			BasketballPlayer(){printf("BasketballPlayer()\n");}
			~BasketballPlayer(){printf("~BasketballPlayer()\n");}
		public :
			void play(){printf("I want playing basketball\n");}
	};

	class FootballPlayer : public Player 
	{
		public :
			FootballPlayer(){printf("FootballPlayer()\n");}
			~FootballPlayer(){printf("~FootballPlayer()\n");}
		public :
			void play(){printf("I want playing football\n");}
	};

	class PingPongPlayer : public Player 
	{
		public :
			PingPongPlayer(){printf("PingPongPlayer()\n");}
			~PingPongPlayer(){printf("~PingPongPlayer()\n");}
		public :
			void play(){printf("I want playing football\n");}
	};
}

int main()
{

//	sg::Player* p = new sg::Player();
	sg::Player* p = new sg::FootballPlayer();
//	sg::Player* p = new sg::BasketballPlayer();
//	sg::Player* p = new sg::PingPongPlayer();

	p->play();
	
	delete p;
	
//	sg::FootballPlayer footplayer;
//	sg::Player &player_referrence = footplayer; 
//	
//	player_referrence.play();


	return 0;
}

